﻿using System;

namespace HalconDotNet
{
	/// <summary>Represents an instance of a 1d function.</summary>
	// Token: 0x0200003D RID: 61
	public class HFunction1D : HData
	{
		/// <summary>Create an uninitialized instance.</summary>
		// Token: 0x06000582 RID: 1410 RVA: 0x0000B2A8 File Offset: 0x000094A8
		public HFunction1D()
		{
		}

		// Token: 0x06000583 RID: 1411 RVA: 0x0000B2B9 File Offset: 0x000094B9
		internal HFunction1D(HData data) : base(data)
		{
		}

		// Token: 0x06000584 RID: 1412 RVA: 0x0001FBB0 File Offset: 0x0001DDB0
		internal static int LoadNew(IntPtr proc, int parIndex, HTupleType type, int err, out HFunction1D obj)
		{
			HTuple t;
			err = HTuple.LoadNew(proc, parIndex, err, out t);
			obj = new HFunction1D(new HData(t));
			return err;
		}

		// Token: 0x06000585 RID: 1413 RVA: 0x0001FBD8 File Offset: 0x0001DDD8
		internal static int LoadNew(IntPtr proc, int parIndex, int err, out HFunction1D obj)
		{
			return HFunction1D.LoadNew(proc, parIndex, HTupleType.MIXED, err, out obj);
		}

		/// <summary>
		///   Create a function from a sequence of y values.
		///   Modified instance represents: Created function.
		/// </summary>
		/// <param name="YValues">X value for function points.</param>
		// Token: 0x06000586 RID: 1414 RVA: 0x0001FBE4 File Offset: 0x0001DDE4
		public HFunction1D(HTuple YValues)
		{
			IntPtr proc = HalconAPI.PreCall(1399);
			HalconAPI.Store(proc, 0, YValues);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(YValues);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Create a function from a sequence of y values.
		///   Modified instance represents: Created function.
		/// </summary>
		/// <param name="YValues">X value for function points.</param>
		// Token: 0x06000587 RID: 1415 RVA: 0x0001FC38 File Offset: 0x0001DE38
		public HFunction1D(double YValues)
		{
			IntPtr proc = HalconAPI.PreCall(1399);
			HalconAPI.StoreD(proc, 0, YValues);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Create a function from a set of (x,y) pairs.
		///   Modified instance represents: Created function.
		/// </summary>
		/// <param name="XValues">X value for function points.</param>
		/// <param name="YValues">Y value for function points.</param>
		// Token: 0x06000588 RID: 1416 RVA: 0x0001FC84 File Offset: 0x0001DE84
		public HFunction1D(HTuple XValues, HTuple YValues)
		{
			IntPtr proc = HalconAPI.PreCall(1400);
			HalconAPI.Store(proc, 0, XValues);
			HalconAPI.Store(proc, 1, YValues);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(XValues);
			HalconAPI.UnpinTuple(YValues);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Create a function from a set of (x,y) pairs.
		///   Modified instance represents: Created function.
		/// </summary>
		/// <param name="XValues">X value for function points.</param>
		/// <param name="YValues">Y value for function points.</param>
		// Token: 0x06000589 RID: 1417 RVA: 0x0001FCE4 File Offset: 0x0001DEE4
		public HFunction1D(double XValues, double YValues)
		{
			IntPtr proc = HalconAPI.PreCall(1400);
			HalconAPI.StoreD(proc, 0, XValues);
			HalconAPI.StoreD(proc, 1, YValues);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>Adds a constant offset to the function's Y values</summary>
		// Token: 0x0600058A RID: 1418 RVA: 0x0001FD38 File Offset: 0x0001DF38
		public static HFunction1D operator +(HFunction1D function, double add)
		{
			return function.ScaleYFunct1d(1.0, add);
		}

		/// <summary>Adds a constant offset to the function's Y values</summary>
		// Token: 0x0600058B RID: 1419 RVA: 0x0001FD4A File Offset: 0x0001DF4A
		public static HFunction1D operator +(double add, HFunction1D function)
		{
			return function.ScaleYFunct1d(1.0, add);
		}

		/// <summary>Subtracts a constant offset from the function's Y values</summary>
		// Token: 0x0600058C RID: 1420 RVA: 0x0001FD5C File Offset: 0x0001DF5C
		public static HFunction1D operator -(HFunction1D function, double sub)
		{
			return function.ScaleYFunct1d(1.0, -sub);
		}

		/// <summary>Negates the Y values of the function</summary>
		// Token: 0x0600058D RID: 1421 RVA: 0x0001FD6F File Offset: 0x0001DF6F
		public static HFunction1D operator -(HFunction1D function)
		{
			return function.NegateFunct1d();
		}

		/// <summary>Scales the function's Y values</summary>
		// Token: 0x0600058E RID: 1422 RVA: 0x0001FD77 File Offset: 0x0001DF77
		public static HFunction1D operator *(HFunction1D function, double factor)
		{
			return function.ScaleYFunct1d(factor, 0.0);
		}

		/// <summary>Scales the function's Y values</summary>
		// Token: 0x0600058F RID: 1423 RVA: 0x0001FD89 File Offset: 0x0001DF89
		public static HFunction1D operator *(double factor, HFunction1D function)
		{
			return function.ScaleYFunct1d(factor, 0.0);
		}

		/// <summary>Scales the function's Y values</summary>
		// Token: 0x06000590 RID: 1424 RVA: 0x0001FD9B File Offset: 0x0001DF9B
		public static HFunction1D operator /(HFunction1D function, double divisor)
		{
			return function.ScaleYFunct1d(1.0 / divisor, 0.0);
		}

		/// <summary>Composes two functions (not a pointwise multiplication)</summary>
		// Token: 0x06000591 RID: 1425 RVA: 0x0001FDB7 File Offset: 0x0001DFB7
		public static HFunction1D operator *(HFunction1D function1, HFunction1D function2)
		{
			return function1.ComposeFunct1d(function2, "constant");
		}

		/// <summary>Calculates the inverse of the function</summary>
		// Token: 0x06000592 RID: 1426 RVA: 0x0001FDC5 File Offset: 0x0001DFC5
		public static HFunction1D operator !(HFunction1D function)
		{
			return function.InvertFunct1d();
		}

		/// <summary>
		///   Plot a function using gnuplot.
		///   Instance represents: Function to be plotted.
		/// </summary>
		/// <param name="gnuplotFileID">Identifier for the gnuplot output stream.</param>
		// Token: 0x06000593 RID: 1427 RVA: 0x0001FDD0 File Offset: 0x0001DFD0
		public void GnuplotPlotFunct1d(HGnuplot gnuplotFileID)
		{
			IntPtr proc = HalconAPI.PreCall(1295);
			base.Store(proc, 1);
			HalconAPI.Store(proc, 0, gnuplotFileID);
			int procResult = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
			GC.KeepAlive(gnuplotFileID);
		}

		/// <summary>
		///   Compose two functions.
		///   Instance represents: Input function 1.
		/// </summary>
		/// <param name="function2">Input function 2.</param>
		/// <param name="border">Border treatment for the input functions. Default: "constant"</param>
		/// <returns>Composed function.</returns>
		// Token: 0x06000594 RID: 1428 RVA: 0x0001FE18 File Offset: 0x0001E018
		public HFunction1D ComposeFunct1d(HFunction1D function2, string border)
		{
			IntPtr proc = HalconAPI.PreCall(1377);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, function2);
			HalconAPI.StoreS(proc, 2, border);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HalconAPI.UnpinTuple(function2);
			HFunction1D result;
			num = HFunction1D.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Calculate the inverse of a function.
		///   Instance represents: Input function.
		/// </summary>
		/// <returns>Inverse of the input function.</returns>
		// Token: 0x06000595 RID: 1429 RVA: 0x0001FE88 File Offset: 0x0001E088
		public HFunction1D InvertFunct1d()
		{
			IntPtr proc = HalconAPI.PreCall(1378);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HFunction1D result;
			num = HFunction1D.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Calculate the derivatives of a function.
		///   Instance represents: Input function
		/// </summary>
		/// <param name="mode">Type of derivative Default: "first"</param>
		/// <returns>Derivative of the input function</returns>
		// Token: 0x06000596 RID: 1430 RVA: 0x0001FED8 File Offset: 0x0001E0D8
		public HFunction1D DerivateFunct1d(string mode)
		{
			IntPtr proc = HalconAPI.PreCall(1379);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, mode);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HFunction1D result;
			num = HFunction1D.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Calculate the local minimum and maximum points of a function.
		///   Instance represents: Input function
		/// </summary>
		/// <param name="mode">Handling of plateaus Default: "strict_min_max"</param>
		/// <param name="interpolation">Interpolation of the input function Default: "true"</param>
		/// <param name="min">Minimum points of the input function</param>
		/// <param name="max">Maximum points of the input function</param>
		// Token: 0x06000597 RID: 1431 RVA: 0x0001FF30 File Offset: 0x0001E130
		public void LocalMinMaxFunct1d(string mode, string interpolation, out HTuple min, out HTuple max)
		{
			IntPtr proc = HalconAPI.PreCall(1380);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, mode);
			HalconAPI.StoreS(proc, 2, interpolation);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			num = HTuple.LoadNew(proc, 0, HTupleType.DOUBLE, num, out min);
			num = HTuple.LoadNew(proc, 1, HTupleType.DOUBLE, num, out max);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Calculate the zero crossings of a function.
		///   Instance represents: Input function
		/// </summary>
		/// <returns>Zero crossings of the input function</returns>
		// Token: 0x06000598 RID: 1432 RVA: 0x0001FFA4 File Offset: 0x0001E1A4
		public HTuple ZeroCrossingsFunct1d()
		{
			IntPtr proc = HalconAPI.PreCall(1381);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HTuple result;
			num = HTuple.LoadNew(proc, 0, HTupleType.DOUBLE, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Multiplication and addition of the y values.
		///   Instance represents: Input function.
		/// </summary>
		/// <param name="mult">Factor for scaling of the y values. Default: 2.0</param>
		/// <param name="add">Constant which is added to the y values. Default: 0.0</param>
		/// <returns>Transformed function.</returns>
		// Token: 0x06000599 RID: 1433 RVA: 0x0001FFF4 File Offset: 0x0001E1F4
		public HFunction1D ScaleYFunct1d(double mult, double add)
		{
			IntPtr proc = HalconAPI.PreCall(1382);
			base.Store(proc, 0);
			HalconAPI.StoreD(proc, 1, mult);
			HalconAPI.StoreD(proc, 2, add);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HFunction1D result;
			num = HFunction1D.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Negation of the y values.
		///   Instance represents: Input function.
		/// </summary>
		/// <returns>Function with the negated y values.</returns>
		// Token: 0x0600059A RID: 1434 RVA: 0x00020054 File Offset: 0x0001E254
		public HFunction1D NegateFunct1d()
		{
			IntPtr proc = HalconAPI.PreCall(1383);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HFunction1D result;
			num = HFunction1D.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Absolute value of the y values.
		///   Instance represents: Input function.
		/// </summary>
		/// <returns>Function with the absolute values of the y values.</returns>
		// Token: 0x0600059B RID: 1435 RVA: 0x000200A4 File Offset: 0x0001E2A4
		public HFunction1D AbsFunct1d()
		{
			IntPtr proc = HalconAPI.PreCall(1384);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HFunction1D result;
			num = HFunction1D.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Return the value of a function at an arbitrary position.
		///   Instance represents: Input function.
		/// </summary>
		/// <param name="x">X coordinate at which the function should be evaluated.</param>
		/// <param name="border">Border treatment for the input function. Default: "constant"</param>
		/// <returns>Y value at the given x value.</returns>
		// Token: 0x0600059C RID: 1436 RVA: 0x000200F4 File Offset: 0x0001E2F4
		public HTuple GetYValueFunct1d(HTuple x, string border)
		{
			IntPtr proc = HalconAPI.PreCall(1385);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, x);
			HalconAPI.StoreS(proc, 2, border);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HalconAPI.UnpinTuple(x);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, HTupleType.DOUBLE, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Return the value of a function at an arbitrary position.
		///   Instance represents: Input function.
		/// </summary>
		/// <param name="x">X coordinate at which the function should be evaluated.</param>
		/// <param name="border">Border treatment for the input function. Default: "constant"</param>
		/// <returns>Y value at the given x value.</returns>
		// Token: 0x0600059D RID: 1437 RVA: 0x0002015C File Offset: 0x0001E35C
		public double GetYValueFunct1d(double x, string border)
		{
			IntPtr proc = HalconAPI.PreCall(1385);
			base.Store(proc, 0);
			HalconAPI.StoreD(proc, 1, x);
			HalconAPI.StoreS(proc, 2, border);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			double result;
			num = HalconAPI.LoadD(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Access a function value using the index of the control points.
		///   Instance represents: Input function.
		/// </summary>
		/// <param name="index">Index of the control points.</param>
		/// <param name="x">X value at the given control points.</param>
		/// <param name="y">Y value at the given control points.</param>
		// Token: 0x0600059E RID: 1438 RVA: 0x000201BC File Offset: 0x0001E3BC
		public void GetPairFunct1d(HTuple index, out HTuple x, out HTuple y)
		{
			IntPtr proc = HalconAPI.PreCall(1386);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, index);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HalconAPI.UnpinTuple(index);
			num = HTuple.LoadNew(proc, 0, HTupleType.DOUBLE, num, out x);
			num = HTuple.LoadNew(proc, 1, HTupleType.DOUBLE, num, out y);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Access a function value using the index of the control points.
		///   Instance represents: Input function.
		/// </summary>
		/// <param name="index">Index of the control points.</param>
		/// <param name="x">X value at the given control points.</param>
		/// <param name="y">Y value at the given control points.</param>
		// Token: 0x0600059F RID: 1439 RVA: 0x0002022C File Offset: 0x0001E42C
		public void GetPairFunct1d(int index, out double x, out double y)
		{
			IntPtr proc = HalconAPI.PreCall(1386);
			base.Store(proc, 0);
			HalconAPI.StoreI(proc, 1, index);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			num = HalconAPI.LoadD(proc, 0, num, out x);
			num = HalconAPI.LoadD(proc, 1, num, out y);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Number of control points of the function.
		///   Instance represents: Input function.
		/// </summary>
		/// <returns>Number of control points.</returns>
		// Token: 0x060005A0 RID: 1440 RVA: 0x00020294 File Offset: 0x0001E494
		public int NumPointsFunct1d()
		{
			IntPtr proc = HalconAPI.PreCall(1387);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			int result;
			num = HalconAPI.LoadI(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Smallest and largest y value of the function.
		///   Instance represents: Input function.
		/// </summary>
		/// <param name="YMin">Smallest y value.</param>
		/// <param name="YMax">Largest y value.</param>
		// Token: 0x060005A1 RID: 1441 RVA: 0x000202E4 File Offset: 0x0001E4E4
		public void YRangeFunct1d(out double YMin, out double YMax)
		{
			IntPtr proc = HalconAPI.PreCall(1388);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			num = HalconAPI.LoadD(proc, 0, num, out YMin);
			num = HalconAPI.LoadD(proc, 1, num, out YMax);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Smallest and largest x value of the function.
		///   Instance represents: Input function.
		/// </summary>
		/// <param name="XMin">Smallest x value.</param>
		/// <param name="XMax">Largest x value.</param>
		// Token: 0x060005A2 RID: 1442 RVA: 0x00020344 File Offset: 0x0001E544
		public void XRangeFunct1d(out double XMin, out double XMax)
		{
			IntPtr proc = HalconAPI.PreCall(1389);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			num = HalconAPI.LoadD(proc, 0, num, out XMin);
			num = HalconAPI.LoadD(proc, 1, num, out XMax);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Access to the x/y values of a function.
		///   Instance represents: Input function.
		/// </summary>
		/// <param name="XValues">X values of the function.</param>
		/// <param name="YValues">Y values of the function.</param>
		// Token: 0x060005A3 RID: 1443 RVA: 0x000203A4 File Offset: 0x0001E5A4
		public void Funct1dToPairs(out HTuple XValues, out HTuple YValues)
		{
			IntPtr proc = HalconAPI.PreCall(1390);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			num = HTuple.LoadNew(proc, 0, num, out XValues);
			num = HTuple.LoadNew(proc, 1, num, out YValues);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Sample a function equidistantly in an interval.
		///   Instance represents: Input function.
		/// </summary>
		/// <param name="XMin">Minimum x value of the output function.</param>
		/// <param name="XMax">Maximum x value of the output function.</param>
		/// <param name="XDist">Distance of the samples.</param>
		/// <param name="border">Border treatment for the input function. Default: "constant"</param>
		/// <returns>Sampled function.</returns>
		// Token: 0x060005A4 RID: 1444 RVA: 0x00020404 File Offset: 0x0001E604
		public HFunction1D SampleFunct1d(HTuple XMin, HTuple XMax, HTuple XDist, string border)
		{
			IntPtr proc = HalconAPI.PreCall(1391);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, XMin);
			HalconAPI.Store(proc, 2, XMax);
			HalconAPI.Store(proc, 3, XDist);
			HalconAPI.StoreS(proc, 4, border);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HalconAPI.UnpinTuple(XMin);
			HalconAPI.UnpinTuple(XMax);
			HalconAPI.UnpinTuple(XDist);
			HFunction1D result;
			num = HFunction1D.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Sample a function equidistantly in an interval.
		///   Instance represents: Input function.
		/// </summary>
		/// <param name="XMin">Minimum x value of the output function.</param>
		/// <param name="XMax">Maximum x value of the output function.</param>
		/// <param name="XDist">Distance of the samples.</param>
		/// <param name="border">Border treatment for the input function. Default: "constant"</param>
		/// <returns>Sampled function.</returns>
		// Token: 0x060005A5 RID: 1445 RVA: 0x00020488 File Offset: 0x0001E688
		public HFunction1D SampleFunct1d(double XMin, double XMax, double XDist, string border)
		{
			IntPtr proc = HalconAPI.PreCall(1391);
			base.Store(proc, 0);
			HalconAPI.StoreD(proc, 1, XMin);
			HalconAPI.StoreD(proc, 2, XMax);
			HalconAPI.StoreD(proc, 3, XDist);
			HalconAPI.StoreS(proc, 4, border);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HFunction1D result;
			num = HFunction1D.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Transform a function using given transformation parameters.
		///   Instance represents: Input function.
		/// </summary>
		/// <param name="paramsVal">Transformation parameters between the functions.</param>
		/// <returns>Transformed function.</returns>
		// Token: 0x060005A6 RID: 1446 RVA: 0x000204F8 File Offset: 0x0001E6F8
		public HFunction1D TransformFunct1d(HTuple paramsVal)
		{
			IntPtr proc = HalconAPI.PreCall(1392);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, paramsVal);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HalconAPI.UnpinTuple(paramsVal);
			HFunction1D result;
			num = HFunction1D.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Calculate transformation parameters between two functions.
		///   Instance represents: Function 1.
		/// </summary>
		/// <param name="function2">Function 2.</param>
		/// <param name="border">Border treatment for function 2. Default: "constant"</param>
		/// <param name="paramsConst">Values of the parameters to remain constant. Default: [1.0,0.0,1.0,0.0]</param>
		/// <param name="useParams">Should a parameter be adapted for it? Default: ["true","true","true","true"]</param>
		/// <param name="chiSquare">Quadratic error of the output function.</param>
		/// <param name="covar">Covariance Matrix of the transformation parameters.</param>
		/// <returns>Transformation parameters between the functions.</returns>
		// Token: 0x060005A7 RID: 1447 RVA: 0x00020554 File Offset: 0x0001E754
		public HTuple MatchFunct1dTrans(HFunction1D function2, string border, HTuple paramsConst, HTuple useParams, out double chiSquare, out HTuple covar)
		{
			IntPtr proc = HalconAPI.PreCall(1393);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, function2);
			HalconAPI.StoreS(proc, 2, border);
			HalconAPI.Store(proc, 3, paramsConst);
			HalconAPI.Store(proc, 4, useParams);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			HalconAPI.InitOCT(proc, 2);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HalconAPI.UnpinTuple(function2);
			HalconAPI.UnpinTuple(paramsConst);
			HalconAPI.UnpinTuple(useParams);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, HTupleType.DOUBLE, num, out result);
			num = HalconAPI.LoadD(proc, 1, num, out chiSquare);
			num = HTuple.LoadNew(proc, 2, HTupleType.DOUBLE, num, out covar);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Compute the distance of two functions.
		///   Instance represents: Input function 1.
		/// </summary>
		/// <param name="function2">Input function 2.</param>
		/// <param name="mode">Modes of invariants. Default: "length"</param>
		/// <param name="sigma">Variance of the optional smoothing with a Gaussian filter. Default: 0.0</param>
		/// <returns>Distance of the functions.</returns>
		// Token: 0x060005A8 RID: 1448 RVA: 0x00020608 File Offset: 0x0001E808
		public HTuple DistanceFunct1d(HFunction1D function2, HTuple mode, HTuple sigma)
		{
			IntPtr proc = HalconAPI.PreCall(1394);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, function2);
			HalconAPI.Store(proc, 2, mode);
			HalconAPI.Store(proc, 3, sigma);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HalconAPI.UnpinTuple(function2);
			HalconAPI.UnpinTuple(mode);
			HalconAPI.UnpinTuple(sigma);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Compute the distance of two functions.
		///   Instance represents: Input function 1.
		/// </summary>
		/// <param name="function2">Input function 2.</param>
		/// <param name="mode">Modes of invariants. Default: "length"</param>
		/// <param name="sigma">Variance of the optional smoothing with a Gaussian filter. Default: 0.0</param>
		/// <returns>Distance of the functions.</returns>
		// Token: 0x060005A9 RID: 1449 RVA: 0x0002068C File Offset: 0x0001E88C
		public HTuple DistanceFunct1d(HFunction1D function2, string mode, double sigma)
		{
			IntPtr proc = HalconAPI.PreCall(1394);
			base.Store(proc, 0);
			HalconAPI.Store(proc, 1, function2);
			HalconAPI.StoreS(proc, 2, mode);
			HalconAPI.StoreD(proc, 3, sigma);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HalconAPI.UnpinTuple(function2);
			HTuple result;
			num = HTuple.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Smooth an equidistant 1D function with a Gaussian function.
		///   Instance represents: Function to be smoothed.
		/// </summary>
		/// <param name="sigma">Sigma of the Gaussian function for the smoothing. Default: 2.0</param>
		/// <returns>Smoothed function.</returns>
		// Token: 0x060005AA RID: 1450 RVA: 0x00020704 File Offset: 0x0001E904
		public HFunction1D SmoothFunct1dGauss(double sigma)
		{
			IntPtr proc = HalconAPI.PreCall(1395);
			base.Store(proc, 0);
			HalconAPI.StoreD(proc, 1, sigma);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HFunction1D result;
			num = HFunction1D.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Compute the positive and negative areas of a function.
		///   Instance represents: Input function.
		/// </summary>
		/// <param name="negative">Area under the negative part of the function.</param>
		/// <returns>Area under the positive part of the function.</returns>
		// Token: 0x060005AB RID: 1451 RVA: 0x0002075C File Offset: 0x0001E95C
		public double IntegrateFunct1d(out HTuple negative)
		{
			IntPtr proc = HalconAPI.PreCall(1396);
			base.Store(proc, 0);
			HalconAPI.InitOCT(proc, 0);
			HalconAPI.InitOCT(proc, 1);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			double result;
			num = HalconAPI.LoadD(proc, 0, num, out result);
			num = HTuple.LoadNew(proc, 1, HTupleType.DOUBLE, num, out negative);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}

		/// <summary>
		///   Read a function from a file.
		///   Modified instance represents: Function from the file.
		/// </summary>
		/// <param name="fileName">Name of the file to be read.</param>
		// Token: 0x060005AC RID: 1452 RVA: 0x000207C0 File Offset: 0x0001E9C0
		public void ReadFunct1d(string fileName)
		{
			IntPtr proc = HalconAPI.PreCall(1397);
			HalconAPI.StoreS(proc, 0, fileName);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Write a function to a file.
		///   Instance represents: Function to be written.
		/// </summary>
		/// <param name="fileName">Name of the file to be written.</param>
		// Token: 0x060005AD RID: 1453 RVA: 0x00020808 File Offset: 0x0001EA08
		public void WriteFunct1d(string fileName)
		{
			IntPtr proc = HalconAPI.PreCall(1398);
			base.Store(proc, 0);
			HalconAPI.StoreS(proc, 1, fileName);
			int procResult = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HalconAPI.PostCall(proc, procResult);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Create a function from a sequence of y values.
		///   Modified instance represents: Created function.
		/// </summary>
		/// <param name="YValues">X value for function points.</param>
		// Token: 0x060005AE RID: 1454 RVA: 0x0002084C File Offset: 0x0001EA4C
		public void CreateFunct1dArray(HTuple YValues)
		{
			IntPtr proc = HalconAPI.PreCall(1399);
			HalconAPI.Store(proc, 0, YValues);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(YValues);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Create a function from a sequence of y values.
		///   Modified instance represents: Created function.
		/// </summary>
		/// <param name="YValues">X value for function points.</param>
		// Token: 0x060005AF RID: 1455 RVA: 0x00020898 File Offset: 0x0001EA98
		public void CreateFunct1dArray(double YValues)
		{
			IntPtr proc = HalconAPI.PreCall(1399);
			HalconAPI.StoreD(proc, 0, YValues);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Create a function from a set of (x,y) pairs.
		///   Modified instance represents: Created function.
		/// </summary>
		/// <param name="XValues">X value for function points.</param>
		/// <param name="YValues">Y value for function points.</param>
		// Token: 0x060005B0 RID: 1456 RVA: 0x000208E0 File Offset: 0x0001EAE0
		public void CreateFunct1dPairs(HTuple XValues, HTuple YValues)
		{
			IntPtr proc = HalconAPI.PreCall(1400);
			HalconAPI.Store(proc, 0, XValues);
			HalconAPI.Store(proc, 1, YValues);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			HalconAPI.UnpinTuple(XValues);
			HalconAPI.UnpinTuple(YValues);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Create a function from a set of (x,y) pairs.
		///   Modified instance represents: Created function.
		/// </summary>
		/// <param name="XValues">X value for function points.</param>
		/// <param name="YValues">Y value for function points.</param>
		// Token: 0x060005B1 RID: 1457 RVA: 0x0002093C File Offset: 0x0001EB3C
		public void CreateFunct1dPairs(double XValues, double YValues)
		{
			IntPtr proc = HalconAPI.PreCall(1400);
			HalconAPI.StoreD(proc, 0, XValues);
			HalconAPI.StoreD(proc, 1, YValues);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			num = base.Load(proc, 0, num);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
		}

		/// <summary>
		///   Smooth an equidistant 1D function by averaging its values.
		///   Instance represents: 1D function.
		/// </summary>
		/// <param name="smoothSize">Size of the averaging mask. Default: 9</param>
		/// <param name="iterations">Number of iterations for the smoothing. Default: 3</param>
		/// <returns>Smoothed function.</returns>
		// Token: 0x060005B2 RID: 1458 RVA: 0x0002098C File Offset: 0x0001EB8C
		public HFunction1D SmoothFunct1dMean(int smoothSize, int iterations)
		{
			IntPtr proc = HalconAPI.PreCall(1401);
			base.Store(proc, 0);
			HalconAPI.StoreI(proc, 1, smoothSize);
			HalconAPI.StoreI(proc, 2, iterations);
			HalconAPI.InitOCT(proc, 0);
			int num = HalconAPI.CallProcedure(proc);
			base.UnpinTuple();
			HFunction1D result;
			num = HFunction1D.LoadNew(proc, 0, num, out result);
			HalconAPI.PostCall(proc, num);
			GC.KeepAlive(this);
			return result;
		}
	}
}
